package com.zjj.lbw.ai;

import org.springframework.context.annotation.Description;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.util.function.Function;

@Component
@Description("用来获取当前时间")
public class DateTool implements Function<DateTool.Request, DateTool.Response> {

    public record Request(String noUse) { }
    public record Response(String date) { }

    @Override
    public Response apply(Request request) {
        System.out.println(request.noUse);
        return new Response(LocalDateTime.now().toString());
    }
}
